/**
 * 查询分院列表
 * @type {string} GET 
 * @param {string} { storeName:分院名称(模糊查询)  }
 */
export function storeList(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/storeList', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 查询分院信息详情
 * @type {string} GET 
 * @param {string} { deptId:分院id ,localCoordinate:当前位置经纬度格式：经度,纬度,mode:walking }
 */
export function storeInfo(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/storeInfo', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 查询分院所设置科室
 * @type {string} GET 
 * @param {string} {storeId:分院id  type:查询数据类型,'dept'排班科室}
 */
export function AllList(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/allList', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 获取日期信息
 * @type {string} GET 
 * @param {string} {dayNum:查询天数}
 */
export function queryDayData(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/queryDayData', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 查询科室医生列表
 * @type {string} GET 
 * @param {string} {appointDate:预约日期  departmentId:科室id(查询分院所设置科室接口中返回的   storeId:'门店id }
 */
export function queryScheduleDoctor(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/queryScheduleDoctor', data).then(info => {
			resolve(info.result)
		})
	})
}
/**
 * 查询医生详情信息
 * @type {string} GET 
 * @param {string} {userId:医生id }
 */
export function doctorInfo(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/doctorInfo', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 查询医生排班信息
 * @type {string} GET 
 * @param {string} {doctorId:医生id  dayNum:查询天数  scheduleType:排班类型1挂号排班2服务排班 }
 */
export function scheduleDoctorInfo(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/scheduleDoctorInfo', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 查询具体号源信息
 * @type {string} GET 
 * @param {string} {scheduleRecordId:排班记录id   	classesType:班次类型1上午2下午3晚  	classesType:班次类型1上午2下午3晚 }
 */
export function appointScheduleList(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/appointScheduleList', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 分院评论区
 * @type {string} GET 
 * @param {string} { id }
 */
// export function storeCommentArea(data) {
// 	return uni.$u.http.get('/applet/appoint/storeCommentArea', data)
// }

/**
 * 评论分院
 * @type {string} POST 
 * @param {string} { openId,storeId:分院id,parentId:父id,content:评论内容,receiveWeUserId:接收评论用户id }
 */
// export function commentToStore(data) {
// 	return uni.$u.http.post('/applet/appoint/commentToStore', data)
// }
/**
 * 删除分院评论
 * @type {string} POST 
 * @param {string} { openId:微信openId,storeId:分院id }
 */
export function removeStoreComment(data) {
	return new Promise(resolve => {
		uni.$u.http.post('/applet/appoint/removeStoreComment', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 预约接口
 * @type {string} POST 
 * @param {string} { customerId：客户id，scheduleId:排班id }
 */
export function makeAppointment(data) {
	return new Promise(resolve => {
		uni.$u.http.post('/applet/appoint/makeAppointment', data).then(info => {
			resolve(info)
		})
	})
}

/**
 * 取消预约
 * @type {string} POST 
 * @param {string} { id：预约列表id，consultantId：咨询师id，triageType：挂号类型 }
 */
export function cancelAppoint(data) {
	return new Promise(resolve => {
		uni.$u.http.post('/applet/appoint/cancelAppoint', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 关注医生
 * @type {string} POST 
 * @param {string} { openId:微信用户id,doctorId:医生id }
 */
export function followDoctor(data) {
	return new Promise(resolve => {
		uni.$u.http.post('/applet/appoint/followDoctor', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 取消关注医生
 * @type {string} POST 
 * @param {string} { openId:微信用户id,doctorId:医生id }
 */
export function unFollowDoctor(data) {
	return new Promise(resolve => {
		uni.$u.http.post('/applet/appoint/unFollowDoctor', data).then(info => {
			resolve(info.result)
		})
	})
}

// /**
//  * 取消关注医生
//  * @type {string} POST 
//  * @param {string} { openId:微信用户id,doctorId:医生id }
//  */
// export function unFollowDoctor(data) {
// 	return uni.$u.http.post('/applet/appoint/unFollowDoctor', data)
// }

/**
 * 我的关注医生
 * @type {string} get 
 * @param {string} { openId:微信用户id }
 */
export function myFollow(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/myFollow', data).then(info => {
			resolve(info.result)
		})
	})
}



/**
 * 医生评论区
 * @type {string} get 
 * @param {string} { id:医生id }
 */
// export function doctorCommentArea(data) {
// 	return uni.$u.http.get('/applet/appoint/doctorCommentArea', data)
// }

/**
 * 评论医生
 * @type {string} POST 
 * @param {string} { openId:微信openId ,doctorId:医生id ,parentId:父id,content:评论内容,receiveWeUserId:接收评论用户id }
 */
// export function commentToDoctor(data) {
// 	return uni.$u.http.post('/applet/appoint/commentToDoctor', data)
// }


/**
 * 删除医生评论
 * @type {string} POST 
 * @param {string} { openId:微信openId doctorId:医生id }
 */
// export function removeDoctorComment(data) {
// 	return uni.$u.http.post('/applet/appoint/removeDoctorComment', data)
// }


/**
 * 分院/医生评价区
 * @type {string} GET 
 * @param {string} { storeId:分院id,doctorId:医生id}
 */
export function evaluateList(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/evaluateList', data).then(info => {
			resolve(info.result)
		})
	})
}


/**
 * 评论
 * @type {string} POST 
 * @param {string} { openId:微信openId,storeId:分院id,parentId:父id,content:评论内容,receiveWeUserId:接收评论用户id}
 */
export function evaluate(data) {
	return new Promise(resolve => {
		uni.$u.http.post('/applet/appoint/evaluate', data).then(info => {
			resolve(info.result)
		})
	})
}


/**
 * 分院/医生评价区
 * @type {string} GET 
 * @param {string} { openId:微信openId}
 */
export function evaluateArea(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/evaluateArea', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 评价点赞
 * @type {string} post 
 * @param {string} { openId:微信openId,id:评论id}
 */
export function evaluateLike(data) {
	return new Promise(resolve => {
		uni.$u.http.post('/applet/appoint/evaluateLike', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 评价取消点赞
 * @type {string} post 
 * @param {string} { openId:微信openId,id:评论id}
 */
export function evaluateUnlike(data) {
	return new Promise(resolve => {
		uni.$u.http.post('/applet/appoint/evaluateUnlike', data).then(info => {
			resolve(info.result)
		})
	})
}

/**
 * 预约记录
 * @type {string} get 
 * @param {string} { openId:微信openId}
 */
export function recordList(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/recordList', data).then(info => {
			resolve(info.result)
		})
	})

}

/**
 * 精选医生
 * @type {string} get 
 * @param {string} { openId:微信openId,pageNo,pageSize}
 */
export function winnowDoctor(data) {
	return new Promise(resolve => {
		uni.$u.http.get('/applet/appoint/winnowDoctor', data).then(info => {
			resolve(info.result)
		})
	})
}